package com.xca.znb.presenter;

import com.xca.znb.entity.Collect;
import com.xca.znb.entity.Goods;
import com.xca.znb.entity.News;
import com.xca.znb.entity.User;
import com.xca.znb.model.imodel.ICollect;

import java.util.List;

public class CollectPresenter {
    private ICollect iCollect ;
    public CollectPresenter(ICollect iCollect){
        this.iCollect = iCollect ;
    }
    public List<Collect> getCollect(String phone, String type) {
        return iCollect.getCollect(phone, type);
    }

    public Collect getCollectById(int id) {
        return iCollect.getCollectById(id);
    }

    public void delCollect(int id) {
        iCollect.delCollect(id);
    }

    public Goods getGoodsById(int id) {
        return iCollect.getGoodsById(id);
    }

    public User getUserByPhone(String phone) {
        return iCollect.getUser(phone);
    }

    public News getNewsById(int id) {
        return iCollect.getNewsById(id);
    }
    public void addOrUpdateFoot(int goodsId, String user, String time) {
        iCollect.addOrUpdateFoot(goodsId,user,time);
    }
}
